import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/page/home/Home'
import Location from '@/page/location/Location'
import Login from '@/page/login/Login'
import register from '@/page/login/register'
import loginPage from '@/page/login/loginPage'
import travelHome from '@/page/independent_travel/travelHome'
import detail from '@/page/independent_travel/detail/detail'
import detailGalary from '@/page/independent_travel/detail/components/detailGalary'
import mapContent from '@/page/independent_travel/detail/components/mapContent'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      component: Home,
    },
	{
	  path: '/location',
	  component: Location,
	},
	{
	  path: '/login',
	  component: Login,
	},
	{
	  path: '/register',
	  component: register,
	},
	{
	  path: '/loginPage',
	  component: loginPage,
	},
	{
	  path: '/travelhome',
	  component: travelHome,
	},
	{
	  path: '/travelhome/detail/:id',
	  component: detail,
	  children:[
		  {
			  path:'galary',
			  component:detailGalary,
		  },
		  {
			  path:'map',
			  component:mapContent,
		  }
	  ]
	},
  ]
})
